/// id : 234
/// type : 0
/// name : "安装工单"
/// service : null
/// orgId : 118
/// orgName : "122212"
/// userId : null
/// userName : "12321"
/// phone : "123123"
/// timeOfAppointment : "2023-10-20 10:40:00"
/// processTime : null
/// handlerBy : 70
/// handlerName : "pddpdd"
/// email : null
/// content : "12321312312"
/// remark : null
/// address : "海淀区"
/// siteId : null
/// siteName : "1111"
/// status : 0
/// source : 1
/// startTime : null
/// endTime : null
/// tails : [{"id":367,"parentId":null,"taskId":234,"name":"创建安装工单","description":null,"processedBy":1,"processorName":"admin","eventId":0,"picture":null,"createTime":"2023-10-20 10:40:46"}]
/// taskTailId : null
/// objId : null
/// createBy : 1
/// createTime : "2023-10-20 10:40:46"
/// createName : "admin"
/// closeTime : null
/// updateBy : null
/// updateTime : "2023-10-20 10:39:47"
/// updateName : null
/// description : null
/// picture : null
/// sourceId : null
/// site : null
/// siteIds : null
/// longitude : 116.2976626527858
/// latitude : 39.95985010027733
/// descPicUrl : null
/// current : 1
/// pageSize : 10

class TaskDetailModel {
  TaskDetailModel({
      num? id, 
      num? type, 
      String? name, 
      dynamic service, 
      num? orgId, 
      String? orgName, 
      dynamic userId, 
      String? userName, 
      String? phone, 
      String? timeOfAppointment, 
      dynamic processTime, 
      num? handlerBy, 
      String? handlerName, 
      dynamic email, 
      String? content, 
      dynamic remark, 
      String? address, 
      dynamic siteId, 
      String? siteName, 
      num? status, 
      num? source, 
      dynamic startTime, 
      dynamic endTime, 
      List<Tails>? tails, 
      dynamic taskTailId, 
      dynamic objId, 
      num? createBy, 
      String? createTime, 
      String? createName, 
      dynamic closeTime, 
      dynamic updateBy, 
      String? updateTime, 
      dynamic updateName, 
      dynamic description, 
      dynamic picture, 
      dynamic sourceId, 
      dynamic site, 
      dynamic siteIds, 
      num? longitude, 
      num? latitude, 
      dynamic descPicUrl, 
      num? current, 
      num? pageSize,}){
    _id = id;
    _type = type;
    _name = name;
    _service = service;
    _orgId = orgId;
    _orgName = orgName;
    _userId = userId;
    _userName = userName;
    _phone = phone;
    _timeOfAppointment = timeOfAppointment;
    _processTime = processTime;
    _handlerBy = handlerBy;
    _handlerName = handlerName;
    _email = email;
    _content = content;
    _remark = remark;
    _address = address;
    _siteId = siteId;
    _siteName = siteName;
    _status = status;
    _source = source;
    _startTime = startTime;
    _endTime = endTime;
    _tails = tails;
    _taskTailId = taskTailId;
    _objId = objId;
    _createBy = createBy;
    _createTime = createTime;
    _createName = createName;
    _closeTime = closeTime;
    _updateBy = updateBy;
    _updateTime = updateTime;
    _updateName = updateName;
    _description = description;
    _picture = picture;
    _sourceId = sourceId;
    _site = site;
    _siteIds = siteIds;
    _longitude = longitude;
    _latitude = latitude;
    _descPicUrl = descPicUrl;
    _current = current;
    _pageSize = pageSize;
}

  TaskDetailModel.fromJson(dynamic json) {
    _id = json['id'];
    _type = json['type'];
    _name = json['name'];
    _service = json['service'];
    _orgId = json['orgId'];
    _orgName = json['orgName'];
    _userId = json['userId'];
    _userName = json['userName'];
    _phone = json['phone'];
    _timeOfAppointment = json['timeOfAppointment'];
    _processTime = json['processTime'];
    _handlerBy = json['handlerBy'];
    _handlerName = json['handlerName'];
    _email = json['email'];
    _content = json['content'];
    _remark = json['remark'];
    _address = json['address'];
    _siteId = json['siteId'];
    _siteName = json['siteName'];
    _status = json['status'];
    _source = json['source'];
    _startTime = json['startTime'];
    _endTime = json['endTime'];
    if (json['tails'] != null) {
      _tails = [];
      json['tails'].forEach((v) {
        _tails?.add(Tails.fromJson(v));
      });
    }
    _taskTailId = json['taskTailId'];
    _objId = json['objId'];
    _createBy = json['createBy'];
    _createTime = json['createTime'];
    _createName = json['createName'];
    _closeTime = json['closeTime'];
    _updateBy = json['updateBy'];
    _updateTime = json['updateTime'];
    _updateName = json['updateName'];
    _description = json['description'];
    _picture = json['picture'];
    _sourceId = json['sourceId'];
    _site = json['site'];
    _siteIds = json['siteIds'];
    _longitude = json['longitude'];
    _latitude = json['latitude'];
    _descPicUrl = json['descPicUrl'];
    _current = json['current'];
    _pageSize = json['pageSize'];
  }
  num? _id;
  num? _type;
  String? _name;
  dynamic _service;
  num? _orgId;
  String? _orgName;
  dynamic _userId;
  String? _userName;
  String? _phone;
  String? _timeOfAppointment;
  dynamic _processTime;
  num? _handlerBy;
  String? _handlerName;
  dynamic _email;
  String? _content;
  dynamic _remark;
  String? _address;
  dynamic _siteId;
  String? _siteName;
  num? _status;
  num? _source;
  dynamic _startTime;
  dynamic _endTime;
  List<Tails>? _tails;
  dynamic _taskTailId;
  dynamic _objId;
  num? _createBy;
  String? _createTime;
  String? _createName;
  dynamic _closeTime;
  dynamic _updateBy;
  String? _updateTime;
  dynamic _updateName;
  dynamic _description;
  dynamic _picture;
  dynamic _sourceId;
  dynamic _site;
  dynamic _siteIds;
  num? _longitude;
  num? _latitude;
  dynamic _descPicUrl;
  num? _current;
  num? _pageSize;
TaskDetailModel copyWith({  num? id,
  num? type,
  String? name,
  dynamic service,
  num? orgId,
  String? orgName,
  dynamic userId,
  String? userName,
  String? phone,
  String? timeOfAppointment,
  dynamic processTime,
  num? handlerBy,
  String? handlerName,
  dynamic email,
  String? content,
  dynamic remark,
  String? address,
  dynamic siteId,
  String? siteName,
  num? status,
  num? source,
  dynamic startTime,
  dynamic endTime,
  List<Tails>? tails,
  dynamic taskTailId,
  dynamic objId,
  num? createBy,
  String? createTime,
  String? createName,
  dynamic closeTime,
  dynamic updateBy,
  String? updateTime,
  dynamic updateName,
  dynamic description,
  dynamic picture,
  dynamic sourceId,
  dynamic site,
  dynamic siteIds,
  num? longitude,
  num? latitude,
  dynamic descPicUrl,
  num? current,
  num? pageSize,
}) => TaskDetailModel(  id: id ?? _id,
  type: type ?? _type,
  name: name ?? _name,
  service: service ?? _service,
  orgId: orgId ?? _orgId,
  orgName: orgName ?? _orgName,
  userId: userId ?? _userId,
  userName: userName ?? _userName,
  phone: phone ?? _phone,
  timeOfAppointment: timeOfAppointment ?? _timeOfAppointment,
  processTime: processTime ?? _processTime,
  handlerBy: handlerBy ?? _handlerBy,
  handlerName: handlerName ?? _handlerName,
  email: email ?? _email,
  content: content ?? _content,
  remark: remark ?? _remark,
  address: address ?? _address,
  siteId: siteId ?? _siteId,
  siteName: siteName ?? _siteName,
  status: status ?? _status,
  source: source ?? _source,
  startTime: startTime ?? _startTime,
  endTime: endTime ?? _endTime,
  tails: tails ?? _tails,
  taskTailId: taskTailId ?? _taskTailId,
  objId: objId ?? _objId,
  createBy: createBy ?? _createBy,
  createTime: createTime ?? _createTime,
  createName: createName ?? _createName,
  closeTime: closeTime ?? _closeTime,
  updateBy: updateBy ?? _updateBy,
  updateTime: updateTime ?? _updateTime,
  updateName: updateName ?? _updateName,
  description: description ?? _description,
  picture: picture ?? _picture,
  sourceId: sourceId ?? _sourceId,
  site: site ?? _site,
  siteIds: siteIds ?? _siteIds,
  longitude: longitude ?? _longitude,
  latitude: latitude ?? _latitude,
  descPicUrl: descPicUrl ?? _descPicUrl,
  current: current ?? _current,
  pageSize: pageSize ?? _pageSize,
);
  num? get id => _id;
  num? get type => _type;
  String? get name => _name;
  dynamic get service => _service;
  num? get orgId => _orgId;
  String? get orgName => _orgName;
  dynamic get userId => _userId;
  String? get userName => _userName;
  String? get phone => _phone;
  String? get timeOfAppointment => _timeOfAppointment;
  dynamic get processTime => _processTime;
  num? get handlerBy => _handlerBy;
  String? get handlerName => _handlerName;
  dynamic get email => _email;
  String? get content => _content;
  dynamic get remark => _remark;
  String? get address => _address;
  dynamic get siteId => _siteId;
  String? get siteName => _siteName;
  num? get status => _status;
  num? get source => _source;
  dynamic get startTime => _startTime;
  dynamic get endTime => _endTime;
  List<Tails>? get tails => _tails;
  dynamic get taskTailId => _taskTailId;
  dynamic get objId => _objId;
  num? get createBy => _createBy;
  String? get createTime => _createTime;
  String? get createName => _createName;
  dynamic get closeTime => _closeTime;
  dynamic get updateBy => _updateBy;
  String? get updateTime => _updateTime;
  dynamic get updateName => _updateName;
  dynamic get description => _description;
  dynamic get picture => _picture;
  dynamic get sourceId => _sourceId;
  dynamic get site => _site;
  dynamic get siteIds => _siteIds;
  num? get longitude => _longitude;
  num? get latitude => _latitude;
  dynamic get descPicUrl => _descPicUrl;
  num? get current => _current;
  num? get pageSize => _pageSize;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['type'] = _type;
    map['name'] = _name;
    map['service'] = _service;
    map['orgId'] = _orgId;
    map['orgName'] = _orgName;
    map['userId'] = _userId;
    map['userName'] = _userName;
    map['phone'] = _phone;
    map['timeOfAppointment'] = _timeOfAppointment;
    map['processTime'] = _processTime;
    map['handlerBy'] = _handlerBy;
    map['handlerName'] = _handlerName;
    map['email'] = _email;
    map['content'] = _content;
    map['remark'] = _remark;
    map['address'] = _address;
    map['siteId'] = _siteId;
    map['siteName'] = _siteName;
    map['status'] = _status;
    map['source'] = _source;
    map['startTime'] = _startTime;
    map['endTime'] = _endTime;
    if (_tails != null) {
      map['tails'] = _tails?.map((v) => v.toJson()).toList();
    }
    map['taskTailId'] = _taskTailId;
    map['objId'] = _objId;
    map['createBy'] = _createBy;
    map['createTime'] = _createTime;
    map['createName'] = _createName;
    map['closeTime'] = _closeTime;
    map['updateBy'] = _updateBy;
    map['updateTime'] = _updateTime;
    map['updateName'] = _updateName;
    map['description'] = _description;
    map['picture'] = _picture;
    map['sourceId'] = _sourceId;
    map['site'] = _site;
    map['siteIds'] = _siteIds;
    map['longitude'] = _longitude;
    map['latitude'] = _latitude;
    map['descPicUrl'] = _descPicUrl;
    map['current'] = _current;
    map['pageSize'] = _pageSize;
    return map;
  }

}

/// id : 367
/// parentId : null
/// taskId : 234
/// name : "创建安装工单"
/// description : null
/// processedBy : 1
/// processorName : "admin"
/// eventId : 0
/// picture : null
/// createTime : "2023-10-20 10:40:46"

class Tails {
  Tails({
      num? id, 
      dynamic parentId, 
      num? taskId, 
      String? name, 
      dynamic description, 
      num? processedBy, 
      String? processorName, 
      num? eventId, 
      dynamic picture, 
      String? createTime,}){
    _id = id;
    _parentId = parentId;
    _taskId = taskId;
    _name = name;
    _description = description;
    _processedBy = processedBy;
    _processorName = processorName;
    _eventId = eventId;
    _picture = picture;
    _createTime = createTime;
}

  Tails.fromJson(dynamic json) {
    _id = json['id'];
    _parentId = json['parentId'];
    _taskId = json['taskId'];
    _name = json['name'];
    _description = json['description'];
    _processedBy = json['processedBy'];
    _processorName = json['processorName'];
    _eventId = json['eventId'];
    _picture = json['picture'];
    _createTime = json['createTime'];
  }
  num? _id;
  dynamic _parentId;
  num? _taskId;
  String? _name;
  dynamic _description;
  num? _processedBy;
  String? _processorName;
  num? _eventId;
  dynamic _picture;
  String? _createTime;
Tails copyWith({  num? id,
  dynamic parentId,
  num? taskId,
  String? name,
  dynamic description,
  num? processedBy,
  String? processorName,
  num? eventId,
  dynamic picture,
  String? createTime,
}) => Tails(  id: id ?? _id,
  parentId: parentId ?? _parentId,
  taskId: taskId ?? _taskId,
  name: name ?? _name,
  description: description ?? _description,
  processedBy: processedBy ?? _processedBy,
  processorName: processorName ?? _processorName,
  eventId: eventId ?? _eventId,
  picture: picture ?? _picture,
  createTime: createTime ?? _createTime,
);
  num? get id => _id;
  dynamic get parentId => _parentId;
  num? get taskId => _taskId;
  String? get name => _name;
  dynamic get description => _description;
  num? get processedBy => _processedBy;
  String? get processorName => _processorName;
  num? get eventId => _eventId;
  dynamic get picture => _picture;
  String? get createTime => _createTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['parentId'] = _parentId;
    map['taskId'] = _taskId;
    map['name'] = _name;
    map['description'] = _description;
    map['processedBy'] = _processedBy;
    map['processorName'] = _processorName;
    map['eventId'] = _eventId;
    map['picture'] = _picture;
    map['createTime'] = _createTime;
    return map;
  }

}